﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucListItem.ascx.cs"
    Inherits="Admin_ucControl_ucListItem" %>
<div id="tabledata" class="section">
    <h2 class="ico_mug">
        DANH MỤC SẢN PHẨM</h2>
    <asp:HyperLink ID="hypNews_new" runat="server" Style="color: Blue" NavigateUrl="~/Admin/ThemSanPham.aspx">
            <h3>Thêm sản phẩm</h3>
    </asp:HyperLink>
    <br />
    <table style="width: 100%;" class="yui">
        <tr>
            <td>
                Tên sản phẩm:
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
            </td>
            <td>
                Loại :
                <asp:DropDownList ID="drCategory" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="btnSearch_1" OnClick="btnSearch_1_Onclick" runat="server" Text="Lọc dữ liệu" />
            </td>
            <td style="text-align: right">
                <asp:Button ID="btnDel" runat="server" OnClick="btnDel_Onclick" Text="Xóa checkbox" />
            </td>
        </tr>
    </table>
    <asp:GridView ID="grdItems" runat="server" CssClass="yui" AutoGenerateColumns="False"
        EmptyDataText="Không có sản phẩm" Width="100%" CellPadding="4" BackColor="White"
        BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" AllowPaging="True"
        PageSize="15" OnPageIndexChanging="grdItems_PageIndexChanging" OnRowDataBound="grdItems_RowDataBound">
        <RowStyle BackColor="White" ForeColor="#330099" />
        <Columns>
            <asp:BoundField DataField="ItemID" HeaderText="ID" />
            <asp:HyperLinkField DataNavigateUrlFields="ItemID" DataTextField="ItemName" HeaderText="Tên sản phẩm"
                DataNavigateUrlFormatString="~/Admin/ThemSanPham.aspx?id={0}">
                <ItemStyle ForeColor="Blue" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="IDMenuChild" DataTextField="MenuChildName"
                HeaderText="Loại" DataNavigateUrlFormatString="~/Admin/DSChiTietLoaiXe.aspx" />
            <asp:TemplateField HeaderText="Giá">
                <ItemTemplate>
                    <asp:HiddenField ID="hidField1" runat="server" />
                    <asp:CheckBox ID="checkGia" runat="server" OnCheckedChanged="checkGia_CheckedChanged"
                        AutoPostBack="true" />
                    <asp:TextBox ID="txtGia" Style="width: 106px" runat="server"></asp:TextBox>
                    <asp:ImageButton ID="btnSave" runat="server" ToolTip="Cập nhật giá" CommandName="Save"
                        OnClick="btnSave_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/save.png"
                        Style="height: 16px" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="175px" />
                <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Confirm">
                <ItemTemplate>
                    <asp:ImageButton ID="btnUpdate" runat="server" ToolTip="Update Product" CommandName="Confirm"
                        OnClick="btnUpdate_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/config.png"
                        Style="width: 16px" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:ImageButton ID="btnConfirm" runat="server" ToolTip="Delete Product" CommandName="Delete"
                        OnClick="btnConfirm_Click" CommandArgument='<%# Eval("ItemID") %>' ImageUrl="~/Admin/img/Del.png" />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="70px" />
                <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="clsGrdHeader" />
        <RowStyle CssClass="clsGrdRow" />
        <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
        <PagerStyle CssClass="clsPage" />
    </asp:GridView>
    <br />
</div>
